package com.thunbu.thunbu_meeting_system.bean

import com.thunbu.thunbu_meeting_system.view.treeView.NodeModel
import java.io.Serializable

data class DepartmentModel(
    val id: Long?,//主键
    val agencyCode: String?,//部门编号
    val agencyName: String?,//部门名称
    val children: List<DepartmentModel>?,
    val ypdUserPos: List<YpdUser>?,//部门人员
    var isUser:Boolean = false, //是否是人员,非接口返回
    var departmentName: String?,//人员塞的部门联动需要
):Serializable,NodeModel{
    data class YpdUser(
            val id: Long?,//主键
            val userId:String?,
            val realName:String?
    ):Serializable

    override fun getmId(): Long {
        return id?:-1
    }

    override fun getName(): String? {
        return agencyName
    }

    override fun getCode(): String? {
        return agencyCode
    }

    override fun getChild(): List<DepartmentModel>? {
        return children
    }

}
